package edu.guet.cn.blogbasics.mapper;

import edu.guet.cn.blogbasics.entity.Users;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hejianding
 * @since 2021-03-30
 */
@Repository
public interface UsersMapper extends BaseMapper<Users> {

    Users login(Users users);

    Users findByName(String userName);

    List<String> getRolesByUserName(String userName);

    Users findByNickName(String nickName);
    //
    void updatePassword(@Param(value = "userName") String userName, @Param(value = "oldPassword") String oldPassword, @Param(value = "newPassword") String newPassword);

}
